home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
MISC
/
MEMALLOC.PAS
next >
Wrap
Pascal/Delphi Source File
|
1996-07-21
|
812b
|
25 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Memory allocation demonstration
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBMEM;
var Allocation1, Allocation2 : AllocationObjectType;
Data : string;
begin
Data := 'Some temporary data to test';
Allocation1.InitializeEmpty;
Allocation1.MoveIn (@Data, SizeOf(Data), 0);
Allocation2.InitializeEmpty;
Allocation2.MoveIn (Allocation1.DataPointer(0), Allocation1.DataSize, 0);
Write (String(Allocation2.DataPointer(0)^), ' = ');
WriteLn (String(Allocation1.DataPointer(0)^));
end.